<!doctype html>
<html ng-app>
  <head>
    <script src="angular.js"></script>
    <script language="javascript">
		function Cntl1($window, $scope){
		  $scope.name = 'World';

		  $scope.greet = function() {
			($window.mockWindow || $window).alert('Hello ' + $scope.name);
		  }
		}
    </script>
  </head>
  <body>
    <div class="example2" ng-controller="Cntl1">
      Name: <input ng-model="name" type="text"/>
      <button ng-click="greet()">Greet</button>
    </div>
  </body>
</html>
